import { routerLang } from '@/enums'
import { getLang } from '@/utils/lang'

export default [
	{
		path: '/',
		redirect: `/${getLang()}`
	},
	{
		path: `${routerLang}`,
		alias: `${routerLang}/home`,
		name: 'home',
		component: () => import('@/views/app/home/index.vue')
	},
	{
		path: `${routerLang}/my-bets`,
		name: 'myBets',
		meta: { category: 'casino' },
		component: () => import(/* webpackChunkName: "my-bets" */ '@/views/profile/my-bets/index.vue')
	},
	{
		path: `${routerLang}/race`,
		name: 'race',
		component: () =>
			import(/* webpackChunkName: "race" */ '@/components/app/app-live-rank/index.vue')
	},
	{
		path: `${routerLang}/test`,
		name: 'test',
		component: () => import(/* webpackChunkName: "not-found" */ '@/views/app/test/index.vue')
	},
	{
		alias: `${routerLang}/icon`,
		path: `${routerLang}/tool/icon`,
		name: 'icon',
		component: () => import('@/views/app/tool/icon.vue')
	},
	{
		path: `${routerLang}/tool/i18n`,
		name: 'i18n',
		component: () => import('@/views/app/tool/i18n.vue')
	},
	{
		path: `${routerLang}/about`,
		name: 'about',
		component: () => import('@/views/app/about/index.vue')
	},
	{
		path: `${routerLang}/account`,
		name: 'account',
		component: () => import('@/views/account/account/index.vue')
	},
	{
		path: `${routerLang}/sports`,
		name: 'sports',
		meta: { category: 'sports' },
		component: () => import(/* webpackChunkName: "sports" */ '@/views/sports/sports/index.vue'),
		children: [
			{
				path: '',
				name: 'SportsHome',
				meta: { category: 'sports' },
				component: () =>
					import(/* webpackChunkName: "sports-home" */ '@/views/sports/sports-home/index.vue')
			},
			{
				path: `${routerLang}/sports-live`,
				name: 'sportsLive',
				meta: { category: 'sports' },
				component: () =>
					import(/* webpackChunkName: "sports-live" */ '@/views/sports/sports-live/index.vue')
			},
			{
				path: `${routerLang}/sports/:id`,
				name: 'sportsType',
				meta: { category: 'sports' },
				component: () =>
					import(/* webpackChunkName: "sports-single" */ '@/views/sports/sports-single/index.vue'),
				children: [
					{
						path: '',
						name: 'SportsPopular',
						component: () =>
							import(
								/* webpackChunkName: "sports-popular" */ '@/views/sports/sports-popular/index.vue'
							)
					},
					{
						path: ':leagueId',
						extends: true,
						name: 'SportsLeague',
						component: () =>
							import(
								/* webpackChunkName: "sports-league" */ '@/views/sports/sports-league/index.vue'
							)
					}
				]
			}
		]
	},
	// feed
	{
		path: `${routerLang}/feed`,
		name: 'feed',
		component: () => import(/* webpackChunkName: "feed" */ '@/views/feed/feed/index.vue'),
		children: [
			{
				path: `${routerLang}/feed`,
				alias: `${routerLang}/feeds`,
				name: 'FeedRecommend',
				component: () =>
					import(/* webpackChunkName: "feed-recommend" */ '@/views/feed/feed-recommend/index.vue')
			},
			{
				path: `${routerLang}/feed-follow`,
				name: 'FeedFollow',
				component: () =>
					import(/* webpackChunkName: "feed-follow" */ '@/views/feed/feed-follow/index.vue')
			}
		]
	},
	// casino
	{
		path: `${routerLang}/casino/home`,
		name: 'casino',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino/index.vue')
	},
	{
		path: `${routerLang}/casino/home/:id`,
		name: 'casinoHomeTags',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino/index.vue')
	},
	// {
	// 	path: `${routerLang}/casino/:id(categories)?/:game`,
	// 	name: 'casinoCategories',
	// 	component: () => import('@/views/casino/categories/index.vue')
	// },
	{
		path: `${routerLang}/casino/providers`,
		name: 'casinoProvider',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino-supplier/index.vue')
	},
	{
		path: `${routerLang}/casino/providers/:id`,
		name: 'casinoProviderDetail',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/provider-detail/index.vue')
	},
	{
		path: `${routerLang}/casino/games/:id?`,
		name: 'casinoDetail',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino-detail/index.vue')
	},
	{
		path: `${routerLang}/casino/tags/:id`,
		name: 'casinoTags',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/tags/index.vue')
	},
	// casinoAllTags
	{
		path: `${routerLang}/casino/tags`,
		name: 'casinoAllTags',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino-tags/index.vue')
	},
	// favorite
	{
		path: `${routerLang}/casino/favourites`,
		name: 'favourites',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino-favorite/index.vue')
	},
	// recent
	{
		path: `${routerLang}/casino/recent`,
		name: 'recent',
		meta: { category: 'casino' },
		component: () => import('@/views/casino/casino-recent/index.vue')
	},
	// // slots
	{
		path: `${routerLang}/slots`,
		name: 'slots',
		component: () => import('@/views/slots/slots/index.vue'),
		children: [
			{
				path: `${routerLang}/slots/games/:id`,
				name: 'SlotsDetail',
				component: () =>
					import(/* webpackChunkName: "slots-detail" */ '@/views/slots/slots-detail/index.vue')
			}
		]
	},
	// mini games
	{
		path: `${routerLang}/games/originals`,
		name: 'games',
		component: () => import(/* webpackChunkName: "games" */ '@/views/games/index.vue'),
		children: [
			{
				path: `${routerLang}/casino/games/2up-originals/plinko`,
				name: 'plinko',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-plinko" */ '@/views/games/plinko/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/mines`,
				name: 'mines',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-mines" */ '@/views/games/mines/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/dice`,
				name: 'dice',
				meta: { category: 'casino' },
				component: () => import(/* webpackChunkName: "games-dice" */ '@/views/games/dice/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/limbo`,
				name: 'limbo',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-limbo" */ '@/views/games/limbo/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/keno`,
				name: 'keno',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-limbo" */ '@/views/games/keno/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/wheel`,
				name: 'wheel',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-limbo" */ '@/views/games/wheel/index.vue')
			},
			{
				path: `${routerLang}/casino/games/2up-originals/diamonds`,
				name: 'diamonds',
				meta: { category: 'casino' },
				component: () =>
					import(/* webpackChunkName: "games-limbo" */ '@/views/games/diamonds/index.vue')
			}
		]
	},
	// activity
	{
		path: `${routerLang}/rewards-vip/:id?`,
		name: 'vip',
		component: () => import('@/views/activity/vip/index.vue')
	},
	{
		path: `${routerLang}/rewards-star/:id?`,
		name: 'star',
		component: () => import('@/views/activity/star/index.vue')
	},
	{
		path: `${routerLang}/details/:id`,
		name: 'activityDetails',
		component: () => import('@/views/activity/activity-5x6/index.vue')
	},
	{
		path: `${routerLang}/affiliate`,
		redirect: { name: 'agent.overview' },
		name: 'agent',
		component: () => import(/* webpackChunkName: "agent" */ '@/views/agent/agent/index.vue'),
		children: [
			{
				path: `${routerLang}/affiliate/overview`,
				name: 'agent.overview',
				component: () =>
					import(/* webpackChunkName: "agent-overview" */ '@/views/agent/overview/index.vue')
			},
			{
				path: `${routerLang}/affiliate/income`,
				name: 'agent.income',
				component: () =>
					import(/* webpackChunkName: "agent-income" */ '@/views/agent/income/index.vue')
			},
			{
				path: `${routerLang}/affiliate/subordinate`,
				name: 'agent.subordinate',
				component: () =>
					import(/* webpackChunkName: "agent-subordinate" */ '@/views/agent/subordinate/index.vue')
			},
			{
				path: `${routerLang}/affiliate/activity`,
				name: 'agent.activity',
				component: () =>
					import(/* webpackChunkName: "agent-activity" */ '@/views/agent/activity/index.vue')
			},
			{
				path: `${routerLang}/affiliate/formula`,
				name: 'agent.formula',
				component: () =>
					import(/* webpackChunkName: "agent-formula" */ '@/views/agent/formula/index.vue')
			}
		]
	},
	{
		path: `${routerLang}/settings`,
		redirect: { name: 'settings.general' },
		name: 'settings',
		meta: { needLogin: true },
		component: () => import('@/views/settings/index.vue'),
		children: [
			{
				path: `${routerLang}/settings/general`,
				name: 'settings.general',
				component: () => import('@/views/settings/general/index.vue')
			},
			{
				path: `${routerLang}/settings/preferences`,
				name: 'settings.preferences',
				component: () => import('@/views/settings/preferences/index.vue')
			},
			{
				path: `${routerLang}/settings/security`,
				name: 'settings.security',
				component: () => import('@/views/settings/security/index.vue')
			},
			{
				path: `${routerLang}/settings/sessions`,
				name: 'settings.sessions',
				component: () => import('@/views/settings/sessions/index.vue')
			},
			{
				path: `${routerLang}/settings/verify`,
				name: 'settings.verify',
				component: () => import('@/views/settings/verify/index.vue')
			}
		]
	},
	{
		path: `${routerLang}/transactions`,
		redirect: { name: 'transactions.all' },
		name: 'transactions',
		meta: { needLogin: false },
		component: () => import('@/views/transactions/index.vue'),
		children: [
			{
				path: `${routerLang}/transactions/all`,
				name: 'transactions.all',
				component: () => import('@/views/transactions/all/index.vue')
			},
			{
				path: `${routerLang}/transactions/deposit`,
				name: 'transactions.deposit',
				component: () => import('@/views/transactions/deposit/index.vue')
			},
			{
				path: `${routerLang}/transactions/withdraw`,
				name: 'transactions.withdraw',
				component: () => import('@/views/transactions/withdraw/index.vue')
			},
			{
				path: `${routerLang}/transactions/bonus`,
				name: 'transactions.bonus',
				component: () => import('@/views/transactions/bonus/index.vue')
			},
			{
				path: `${routerLang}/transactions/tips`,
				name: 'transactions.tips',
				component: () => import('@/views/transactions/tips/index.vue')
			},
			{
				path: `${routerLang}/transactions/agent`,
				name: 'transactions.agent',
				component: () => import('@/views/transactions/agent/index.vue')
			},
			{
				path: `${routerLang}/transactions/adjust`,
				name: 'transactions.adjust',
				component: () => import('@/views/transactions/adjust/index.vue')
			}
		]
	}
]
